import {setServer} from "@/utils/axios";
import {deviceUrl} from "../../../url";
const request = setServer(deviceUrl);

// 查询监控账号
export function getAccount(query) {
  return request({
    url: '/monitor/account/list',
    method: 'get',
    params: query
  })
}

// 监控账号详情
export function getAccountDetail(id) {
  return request({
    url: '/monitor/account/'+id,
    method: 'get',
  })
}

// 增监控账号
export function addAccount(query) {
  return request({
    url: '/monitor/account/',
    method: 'post',
    data: query
  })
}

// 改监控账号
export function updateAccount(query) {
  return request({
    url: '/monitor/account/',
    method: 'put',
    data: query
  })
}

// 删监控账号
export function deleteAccount(id) {
  return request({
    url: '/monitor/account/'+id,
    method: 'delete',
  })
}

// 查询监控设备服务器
export function getMonitorAccount(query) {
  return request({
    url: '/monitor/account/refer',
    method: 'get',
    params: query
  })
}
